home *** CD-ROM | disk | FTP | other *** search
/ Apple Macintosh CD: Power Macintosh 5200/75 / Apple Macintosh CD - Power Macintosh 5200_75.7z / Apple Macintosh CD - Power Macintosh 5200_75.bin / Extras / PowerTalk Extras / PowerTalk Mail Gateways / STF PowerFax™ PE Gateway / PowerFax™ PE Installer / STFApplications.sit / ARA Scripts / MultiTechMultiModem1432 (LnMgr) < prev    next >
Text File  |  1994-07-11  |  4KB  |  206 lines

  1. ! "MultiTech MultiModem1432BA/BL/MU - 3/2/93"
  2. ! This script has been verified to work with Line Manager
  3. ! Uses normal mode and hardware flow control.
  4. !
  5. @ORIGINATE
  6. @ANSWER
  7. !
  8. @LABEL 1
  9. serreset 19200, 0, 8, 1
  10. !
  11. ! first recall the factory configuration, and set the modem for 
  12. ! extended response codes and turn echo and baud adjust off.
  13. !
  14. settries 0
  15. matchclr
  16. matchstr 1 3 "OK\13\10"
  17. @LABEL 2
  18. ! &Q1 : Uses standard AT command set
  19. ! X4 : Result code with no dialtone and busy
  20. ! E0 : No echo
  21. ! $BA0 : Enable speed conversion
  22. write "AT&F&Q1X4E0$BA0\13"
  23. matchread 20
  24. inctries
  25. iftries 2 59
  26. ! Modem not responding, toggle DTR
  27. DTRClear
  28. pause 5
  29. DTRSet
  30. jump 2
  31. !
  32. ! Next, turn on CTS flow control, and disable Error Correction.
  33. !
  34. @LABEL 3
  35. matchstr 1 4 "OK\13\10"
  36. ! &D0 : DTR is ignored
  37. ! &E0 : Enable V.42 normal mode
  38. ! &E4 : Enable CTS modem-initiated flow control
  39. write "AT&D0&E0&E4\13"
  40. matchread 30
  41. jump 59
  42. !
  43. ! reduce transmit buffer size
  44. !
  45. @LABEL 4
  46. matchstr 1 5 "OK"
  47. ! &B1 : Enable reduced transmit buffer size
  48. write "AT&B1\13"
  49. matchread 30
  50. jump 59
  51. !
  52. ! Assuming that the modem speaker is on, if str 2 is "0" turn it off
  53. !
  54. @LABEL 5
  55. ifstr 2 8 "1"
  56. matchstr 1 8 "OK\13\10"
  57. write "ATM0\13"
  58. matchread 30
  59. jump 59
  60.  
  61. !
  62. ! The modem is ready so enable answering, or originate a call
  63. !
  64. @LABEL 8
  65. ifANSWER 30
  66. note "Dialing ^1" 3
  67. write "ATDT^1\13"
  68. !
  69. @LABEL 9
  70. matchstr 1 11 "CONNECT 1200\13\10"
  71. matchstr 2 12 "CONNECT 2400\13\10"
  72. matchstr 3 13 "CONNECT 4800\13\10"
  73. matchstr 4 19 "CONNECT 7200\13\10"
  74. matchstr 5 14 "CONNECT 9600\13\10"
  75. matchstr 6 20 "CONNECT 12000\13\10"
  76. matchstr 7 18 "CONNECT 14400\13\10"
  77. matchstr 8 50 "NO CARRIER\13\10"
  78. matchstr 9 50 "ERROR\13\10"
  79. matchstr 10 52 "NO DIALTONE\13\10"
  80. matchstr 11 53 "BUSY\13\10"
  81. matchstr 12 54 "NO ANSWER\13\10"
  82. matchread 700
  83. jump 59
  84. !
  85. @LABEL 11
  86. note "Communicating at 1200 bps." 2
  87. serreset 19200, 0, 8, 1
  88. !
  89. jump 15
  90. @LABEL 12
  91. note "Communicating at 2400 bps." 2
  92. serreset 19200, 0, 8, 1
  93. jump 15
  94. !
  95. @LABEL 13
  96. note "Communicating at 4800 bps." 2
  97. serreset 19200, 0, 8, 1
  98. jump 15
  99. !
  100. @LABEL 19
  101. note "Communicating at 7200 bps." 2
  102. serreset 19200, 0, 8, 1
  103. jump 15
  104. !
  105. @LABEL 14
  106. note "Communicating at 9600 bps." 2
  107. serreset 19200, 0, 8, 1
  108. jump 15
  109. !
  110. @LABEL 20
  111. note "Communicating at 12000 bps." 2
  112. serreset 19200, 0, 8, 1
  113. jump 15
  114. !
  115. @LABEL 18
  116. note "Communicating at 14400 bps." 2
  117. serreset 19200, 0, 8, 1
  118. @LABEL 15
  119. HSRESET 0 1 0 0 0 0
  120. ifANSWER 16
  121. pause 30
  122. @LABEL 16 
  123. exit 0
  124. !
  125. ! @ANSWER
  126. ! Set up the modem to answer
  127. @LABEL 30
  128. write "ATS0=1\13"
  129. matchstr 1 31 "OK\13\10"
  130. matchread 30
  131. jump 59
  132. !
  133. @LABEL 31
  134. matchstr 1  32 "RING\13\10"
  135. matchstr 2  11 "CONNECT 1200\13\10"
  136. matchstr 3  12 "CONNECT 2400\13\10"
  137. matchstr 4  13 "CONNECT 4800\13\10"
  138. matchstr 5  19 "CONNECT 7200\13\10"
  139. matchstr 6  14 "CONNECT 9600\13\10"
  140. matchstr 7  20 "CONNECT 12000\13\10"
  141. matchstr 8  18 "CONNECT 14400\13\10"
  142. matchstr 9  50 "NO CARRIER\13\10"
  143. matchstr 10 50 "ERROR\13\10"
  144. matchstr 11 52 "NO DIALTONE\13\10"
  145. matchstr 12 53 "BUSY\13\10"
  146. matchstr 13 54 "NO ANSWER\13\10"
  147. matchread 700
  148. jump 31
  149. !
  150. @LABEL 32
  151. userhook 1
  152. note "Answering phone…" 2
  153. jump 31
  154. !
  155. ! 50: error messages
  156. !
  157. @LABEL 50
  158. exit -6021
  159. !
  160. @LABEL 52
  161. exit -6020
  162. !
  163. @LABEL 53
  164. exit -6022
  165. !
  166. @LABEL 54
  167. exit -6023
  168. !
  169. @LABEL 59
  170. exit -6019
  171. !
  172. ! Hang up the modem
  173. !
  174. @HANGUP
  175. @LABEL 60
  176. settries 0
  177. @LABEL 61
  178. matchclr
  179. matchstr 1 62 "OK\13\10"
  180. matchstr 2 62 "NO CARRIER\13\10"
  181. matchstr 3 62 "ERROR\13\10"
  182. write "ATH\13"
  183. matchread 10
  184. inctries
  185. iftries 3 59
  186. ! no response, try escape sequence
  187. DTRClear
  188. pause 5
  189. DTRSet
  190. write "+++"
  191. matchclr
  192. matchstr 1 61 "OK\13\10"
  193. matchread 15
  194. jump 61
  195. !
  196. @LABEL 62
  197. ! set modem back to factory settings
  198. pause 5
  199. write "AT&F\13"
  200. matchclr
  201. matchstr 1 63 "OK\13\10"
  202. matchread 30
  203. !
  204. @LABEL 63
  205. exit 0
  206.